﻿using System;

namespace ReadyApps.Data.Wiki
{
    /// <summary>
    /// Represents the available retention settings.
    /// </summary>
    [Serializable]
    public class RetentionSettings
    {
        #region Properties

        /// <summary>
        /// Gets the unique page identifier.
        /// </summary>
        public int PageID { get; private set; }

        /// <summary>
        /// Gets or sets the unit for the retention policy.
        /// </summary>
        public RetentionUnit Unit { get; set; }

        /// <summary>
        /// Gets or sets the duration or quantity of the retention policy.
        /// </summary>
        public int Measure { get; set; }

        #endregion

        #region Constructor

        /// <summary>
        /// Creates a new <see cref="RetentionSettings"/> object for the supplied page, retention
        /// unit, and retention duration.
        /// </summary>
        /// <param name="pageID">The unique page identifier.</param>
        /// <param name="unit">The unit for the retention policy.</param>
        /// <param name="measure">The duration or quantity of the retention policy.</param>
        public RetentionSettings(int pageID, RetentionUnit unit, int measure)
        {
            PageID = pageID;
            Unit = unit;
            Measure = measure;
        }

        #endregion
    }
}
